import React, { Component } from "react";
import NewPortal from "./newPortal/newPortal";
import "./index.scss";
export default class MyCard extends Component {
  constructor(props) {
    super(props);
  }
  render() {
    const { title,desc,color } = this.props;
    console.log(title)
    return (
      <NewPortal>
        <div className="card" style={{color:`${color}`}}>
          <h1>标题：{title}</h1>
          <h2>描述：{desc}</h2>
        </div>
      </NewPortal>
    );
  }
}
MyCard.defaultProps = {
  title: "卡片",
  desc: "前端共享组件案例测试",
  color:"red"
};
